home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / Freeware / PerfectPaint / rexx / bridge / MkPict-Brush.rx < prev    next >
Encoding:
Text File  |  2001-10-17  |  747 b   |  53 lines

  1. /*     arexx Script 
  2. */
  3.  
  4.     options results
  5.     parse ARG Port flag b
  6.     
  7.     ADDRESS value Port
  8.  
  9.     pp_GetWidth
  10.     w=result
  11.  
  12.     pp_GetHeight
  13.     h=result
  14.  
  15.     if w=0 then exit
  16.     
  17.     IF flag=-1 then DO
  18.         pp_FindEmptyBrush
  19.         Brush=result
  20.         if Brush=-1 then DO
  21.             pp_Warn "can't*find*empty|Brush."
  22.             EXIT        
  23.         END
  24.         pp_SetBrush Brush
  25.  
  26.         pp_LockPfPaint
  27.         pp_Progresstext "Grab*Picture"
  28.         pp_StencilOn
  29.         pp_PickBrush 0 0 w h 1
  30.         pp_StencilOff
  31.         pp_ProgressClr
  32.         pp_UlockPfPaint
  33.     END
  34.     ELSE DO
  35.         pp_GetCurrentBuffer
  36.         CBf=result
  37.         pp_SetBuffer flag
  38.         pp_GetWidth
  39.         w=result
  40.         pp_GetHeight
  41.         h=result
  42.         pp_LockPfPaint        
  43.         pp_Progresstext "Grab*Picture"
  44.         pp_StencilOn
  45.         pp_PickBrush 0 0 w h 1
  46.         pp_StencilOff        
  47.         pp_ProgressClr
  48.         pp_UlockPfPaint
  49.         pp_SetBuffer CBf                
  50.     END
  51.  
  52.     EXIT    
  53.